package com.qfedu.kbonline.dao;

import com.qfedu.kbonline.entity.User;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;


/**
 * @description: 牛逼哄哄的代码生成器
 * @author: 韩智飞
 * @create: 2020-09-15 13:14:02
 */
public interface UserDao {
    /*新增*/
    @Insert("insert into user (id,tel,password,nickname,birthday,gender,idCard,icon) values(#{id},#{tel},#{password},#{nickname},#{birthday},#{gender},#{idCard},#{icon})")
    int insert(User user);

    /*删除*/
    @Delete("delete from user where id=#{id}")
    int deleteById(int id);

    List<User> all();
}